/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package webOffline;

import javax.swing.tree.DefaultMutableTreeNode;

/**
 *
 * @author Do Viet Trung
 */
public class ProjectDownloadManager {
    private ProjectAddress projectAddress;
    private ProjectDownloadLinks startingAddress;
    private boolean finished;

    ProjectDownloadManager() throws Exception {
        projectAddress = new ProjectAddress ();
        startingAddress = new ProjectDownloadLinks ();
        finished = false;
    }

    ProjectDownloadManager(ProjectAddress projectAddress) throws Exception {
        this.projectAddress = projectAddress;
        startingAddress = new ProjectDownloadLinks(projectAddress);
        //startingAddress = new ProjectDownloadLinks(projectAddress.getAddress());
        finished = false;
    }

    public DefaultMutableTreeNode getTopNode() {
        return startingAddress.getNode();
    }

    public boolean isFinished() {
        return finished;
    }

    public void setFinished(boolean finished) {
        this.finished = finished;
    }

    public ProjectAddress getProjectAddress() {
        return projectAddress;
    }

    public void setProjectAddress(ProjectAddress projectAddress) {
        this.projectAddress = projectAddress;
    }

    public ProjectDownloadLinks getStartingAddress() {
        return startingAddress;
    }

    public void setStartingAddress(ProjectDownloadLinks startingAddress) {
        this.startingAddress = startingAddress;
    }
}
